home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2010 Summer - Disc 1 / WN_Ete2010_CD1.iso / Onglet5 / Weezo / Weezo setup.exe / {code_appDir} / www / includes / viewImageFunctions.php < prev    next >
PHP Script  |  2010-05-19  |  20KB  |  421 lines

  1. <?php
  2. /**
  3.  * Images viewer
  4.  *
  5.  * Included by viewFunctions.php
  6.  * parameters :
  7.  * - $completeFilename : complete filename of image to view
  8.  * - $command : command
  9.  * - $extraData : [image outer width]x[image outer height]
  10.  *
  11.  * PHP version 5
  12.  *
  13.  * LICENSE: This source file is subject to version 3.0 of the PHP license
  14.  * that is available through the world-wide-web at the following URI:
  15.  * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
  16.  * the PHP License and are unable to obtain it through the web, please
  17.  * send a note to license@php.net so we can mail you a copy immediately.
  18.  *
  19.  * @category   NA
  20.  * @package    NA
  21.  * @author     Nicolas Bruley / Peer 2 World <contact@weezo.net>
  22.  * @copyright  2005-2009 Nicolas Bruley / Peer 2 World
  23.  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  24.  * @version    CVS: $Id:$
  25.  * @link       http://www.weezo.net
  26.  * @since      File available since Release 1.1.0
  27.  */
  28.  
  29. if(!defined('SLIDESHOW_TIMER_CONTROL_NAME')) define('SLIDESHOW_TIMER_CONTROL_NAME','slideShowInterval');
  30.  
  31.  
  32. /**
  33.  * Return an image's rotation, from user-set rotation or EXIF defined orientation
  34.  * In case of auto Exif rotation, put rotation in 'rot' array
  35.  *
  36.  * @param string $cfn
  37.  * @return int 0,90,180,270
  38.  */
  39. function getRotation($cfn){
  40.     if((cfFileExtension($cfn)=='jpg'||cfFileExtension($cfn)=='jpeg') && cfRGetVar('rot',$cfn,false,null)===null && cfGGetVar('EXIFAutoRotation')){
  41.         if($r=cfArrayItem(@exif_read_data($cfn),'Orientation')){
  42.             if($r==3) $rot=180;
  43.             if($r==6 || $r==7) $rot=90;
  44.             if($r==5 || $r==8) $rot=270;
  45.             if(isset($rot)){
  46.                 cfRSetVar('rot',$cfn,$rot);
  47.                 return $rot;
  48.             }
  49.         }
  50.     }
  51.     return (int)cfRGetVar('rot',$cfn);
  52. }
  53.  
  54. /**
  55.  * @desc return image width and height
  56.  *
  57.  * @param string $completeFilename : image filename
  58.  * @return array(width, height)
  59.  */
  60. function getImageDimensions($completeFilename){
  61.     if(cfFileExtension($completeFilename)=='itc'){
  62.         if(!($sourceImage=@imagecreatefromstring(substr(file_get_contents($completeFilename),500)))) return array(400,300);
  63.         $sourceWidth=imagesx($sourceImage); $sourceHeight=imagesy($sourceImage);
  64.         $sourceImage=null;
  65.     }
  66.     elseif(cfFileExtension($completeFilename)=='itc2'){
  67.         if(!($sourceImage=@imagecreatefromstring(substr(file_get_contents($completeFilename),492)))) return array(400,300);
  68.         $sourceWidth=imagesx($sourceImage); $sourceHeight=imagesy($sourceImage);
  69.         $sourceImage=null;
  70.     }
  71.     else list($sourceWidth, $sourceHeight, $type, $attr) = @getimagesize($completeFilename);
  72.     if(!$sourceWidth) $sourceWidth=120;
  73.     if(!$sourceHeight) $sourceHeight=120;
  74.  
  75.     // iPhone: limit output size
  76.     if(cfBGetVar('name')=='iPhone'){
  77.         list($sourceWidth,$sourceHeight)=cfThumbnailDimensions($sourceWidth,$sourceHeight,480*3,320*3,false);
  78.     }
  79.  
  80.     return array($sourceWidth,$sourceHeight);
  81. }
  82.  
  83. /**
  84.  * @desc return previous or next file in a directory
  85.  *
  86.  * @param string $completeFilename : path and file name of current file
  87.  * @param string $position : position of searched file : 'next' or 'previous'
  88.  * @param string $fileType : optional : restrict search to files whose (left part of) mime type is $fileType
  89.  * @param string $fileExt : optional : restrict search to files whose extension is $fileExt
  90.  * @param int $postion: optional: return position of completeFilename in list
  91.  * @param int $total : optional: return total number of files (images)
  92.  * @return string : complete filename of previous or next file
  93.  */
  94. function findContiguousFile($completeFilename,$position,$fileType=false, $fileExt=false, &$postion=null, &$total=null){
  95.     static $files=false;
  96.     if($position!='next' && $position!='previous') return $completeFilename;
  97.  
  98.     // Get file's directory
  99.     if(cfSharedMode('list') && @$_POST['data1']=='*resourceBasePath*') $dir='*resourceBasePath*/'; else $dir=cfDirName($completeFilename);
  100.     // Get dir's images (only process once)
  101.     if(!$files) {
  102.         $files=efGetDirContent($dir,false,false,'image',true,array('noExtra'=>1));
  103.         foreach ($files as $k=>$v) if(!is_array($v)) unset($files[$k]);
  104.     }
  105.     $total=count($files);
  106.     if(count($files)<2) return $completeFilename;
  107.  
  108.     // Browse files
  109.     reset($files);
  110.     $elt=current($files);
  111.     $postion=0;
  112.     while($elt!==false) {
  113.         $postion++;
  114.         // Current element found
  115.         if($elt['completeFileName']==$completeFilename){
  116.             // Look for next
  117.             if($position=='next'){
  118.                 if($elt=next($files)) return $elt['completeFileName'];
  119.                 $elt=reset($files);
  120.                 return $elt['completeFileName'];
  121.             }
  122.             // Look for previous
  123.             else{
  124.                 if($elt=prev($files)) return $elt['completeFileName'];
  125.                 $elt=end($files);
  126.                 return $elt['completeFileName'];
  127.             }
  128.         }
  129.         $elt=next($files);
  130.     }
  131.     return $completeFilename; // should'nt happend
  132. }
  133.  
  134. /**
  135.  * @desc Return true if image has EXIF data
  136.  *
  137.  * @param string $completeFilename: name and path of image
  138.  * @return boolean
  139.  */
  140. function hasExifData($completeFilename){
  141.     $exif=@exif_read_data($completeFilename);
  142.     if(!$exif || !isset($exif['SectionsFound']) || !$exif['SectionsFound']) return false;
  143.     return true;
  144. }
  145.  
  146. // If required by another script for functions, don't execute
  147. if(isset($requiredScript)) return ;
  148.  
  149. /*
  150.  ***************************************************************************************************************************
  151.  * Process POST commands
  152.  ***************************************************************************************************************************
  153.  */
  154. if(cfIsAsync()){// async request
  155.     cfAsyncHeader();
  156.     $output='';
  157.  
  158.     $skipImages=0; // !=0 if user pressed several times next or prev buttons
  159.     $resetImgDims=0; // 1 to reset center image position because some images have been skipped and normal animation behaviour doesn't apply anymore
  160.     if(cfCmpLeft($command,'next/')||cfCmpLeft($command,'prev/')){
  161.         $skipImages=substr($command,5);
  162.         $resetImgDims=1;
  163.         $command=substr($command,0,4);
  164.     }
  165.  
  166.     if($command=="fullsize") cfRSetVar('fullSizeView',true); // Set full-size view
  167.     elseif($command=="resized") cfRSetVar('fullSizeView',false); // Set resized view
  168.     elseif($command=="toggleSlideshow") {cfRSetVar('slideshow',!cfRGetVar('slideshow')); cfRSetVar('fullSizeView',false);} // Toggle slideshow & set resized view
  169.     elseif($command=="rotate0") cfRSetVar('rot',$completeFilename,0);
  170.     elseif($command=="rotate90") cfRSetVar('rot',$completeFilename,90);
  171.     elseif($command=="rotate180") cfRSetVar('rot',$completeFilename,180);
  172.     elseif($command=="rotate270") cfRSetVar('rot',$completeFilename,270);
  173.     // Show EXIF data in tooltip
  174.     if($command=='getFileInfo') {
  175.         require(INCLUDE_DIR.'fileInfoFunctions.php');
  176.         $getThumbnail=0;
  177.         echo cfAsyncXMLJSaction('tooltipSetProperties('.fiPHPArrayToJSArray(fiGetInfo($completeFilename,$getThumbnail)).')');
  178.     }
  179.     if($command=='next' || $command=='prev' || $command=='view' || substr($command,0,3)=='rot'){
  180.         if($command=='prev' || $command=='next') {
  181.             
  182.             while(1){
  183.                 if($skipImages<0 || $command=='prev'){
  184.                     $completeFilenameNext=$completeFilename;
  185.                     $completeFilename=findContiguousFile($completeFilename,'previous','image');
  186.                     $completeFilenamePrev=findContiguousFile($completeFilename,'previous','image',false,$filePos,$fileTotal);
  187.                     if(!$skipImages) break;
  188.                     $skipImages++;
  189.                 }
  190.                 else{
  191.                     $completeFilenamePrev=$completeFilename;
  192.                     $completeFilename=findContiguousFile($completeFilename,'next','image');
  193.                     $completeFilenameNext=findContiguousFile($completeFilename,'next','image',false,$filePos,$fileTotal);
  194.                     if(!$skipImages) break;
  195.                     $skipImages--;
  196.                 }
  197.             }
  198.         }
  199.         if($command=='view' || substr($command,0,3)=='rot'){
  200.             $completeFilenamePrev=findContiguousFile($completeFilename,'previous','image');
  201.             $completeFilenameNext=findContiguousFile($completeFilename,'next','image',false,$filePos,$fileTotal);
  202.         }
  203.  
  204.         // Log content access
  205.         if($command=='next' || $command=='prev' || $command=='view') cfLogContentAccess($completeFilename);
  206.  
  207.         // Set previous image dimensions
  208.         if($command!='next' && substr($command,0,3)!='rot'){
  209.             list($sourceWidth, $sourceHeight) = getImageDimensions($completeFilenamePrev);
  210.             if(($rot=getRotation($completeFilenamePrev))=='90' || $rot=='270') cfSwap($sourceWidth, $sourceHeight);
  211.             $output.=cfAsyncXMLJSaction('pfw='.$sourceWidth.';pfh='.$sourceHeight.';pTitle="'.cfUTF8Encode(cfFileWithoutExtension(basename($completeFilenamePrev))).'";');
  212.         }
  213.         // Set next image dimensions and title
  214.         if($command!='prev' && substr($command,0,3)!='rot'){
  215.             list($sourceWidth, $sourceHeight) = getImageDimensions($completeFilenameNext);
  216.             if(($rot=getRotation($completeFilenameNext))=='90' || $rot=='270') cfSwap($sourceWidth, $sourceHeight);
  217.             $output.=cfAsyncXMLJSaction('nfw='.$sourceWidth.';nfh='.$sourceHeight.';nTitle="'.cfUTF8Encode(cfFileWithoutExtension(basename($completeFilenameNext))).'";');
  218.         }
  219.         // Set current image properties
  220.         if($command=='view' || substr($command,0,3)=='rot' || $resetImgDims){
  221.             list($sourceWidth, $sourceHeight) = getImageDimensions($completeFilename);
  222.             if(($rot=getRotation($completeFilename))=='90' || $rot=='270') cfSwap($sourceWidth, $sourceHeight);
  223.         }
  224.         else $sourceWidth=$sourceHeight=0;
  225.         
  226.         
  227.  
  228.         // Set (next) previous image template URL
  229.         $output.=cfAsyncXMLJSaction('imgURLPrev="'.cfExtImage($completeFilenamePrev,'<WIDTH>','<HEIGHT>',true,(int)cfRGetVar('rot',$completeFilenamePrev)).'";');
  230.         // Set current image template URL
  231.         $output.=cfAsyncXMLJSaction('imgURL="'.cfExtImage($completeFilename,'<WIDTH>','<HEIGHT>',true,'<ANGLE>').'";rot='.(int)cfRGetVar('rot',$completeFilename));
  232.         
  233.         // Set current image full size URL
  234.         if(cfBGetVar('name')=='iPhone'){
  235.             list($width, $height) = getImageDimensions($completeFilename);
  236.             $output.=cfAsyncXMLJSaction('imgURLFull="'.cfExtImage($completeFilename,$width,$height,true,'<ANGLE>').'";');
  237.         }
  238.         else
  239.             $output.=cfAsyncXMLJSaction('imgURLFull="'.cfExtImage($completeFilename,0,0,true,'<ANGLE>').'";');
  240.  
  241.         // Set (next) next image template URL
  242.         $output.=cfAsyncXMLJSaction('imgURLNext="'.cfExtImage($completeFilenameNext,'<WIDTH>','<HEIGHT>',true,(int)cfRGetVar('rot',$completeFilenameNext)).'";');
  243.  
  244.         
  245.         $output.=cfAsyncXMLJSaction('setImageData("'.cfUTF8Encode(cfFileWithoutExtension(basename($completeFilename))).'","'.cfUTF8Encode(basename($completeFilename)).'",'.(int)$sourceWidth.','.(int)$sourceHeight.','.(int)$filePos.','.(int)$fileTotal.');');
  246.         
  247.  
  248.         if         ($command=='next')                $output.=cfAsyncXMLJSaction('nextProceed('.$resetImgDims.')');
  249.         elseif    ($command=='prev')                $output.=cfAsyncXMLJSaction('prevProceed('.$resetImgDims.')');
  250.         elseif    ($command=='view')                $output.=cfAsyncXMLJSaction('loadProceed(true)');
  251.         elseif    (substr($command,0,3)=='rot')    $output.=cfAsyncXMLJSaction('loadProceed(false)');
  252.         if(cfRGetVar('showExifData') &&($command!='rot'))
  253.             $output.=cfAsyncXMLJSaction('showExifHover('.((hasExifData($completeFilename))?'1':'0').')');
  254.     }
  255.     echo $output;
  256.     echo cfAsyncFooter();
  257.     exit;
  258. }
  259.  
  260. /*
  261.  ***************************************************************************************************************************
  262.  * Display page
  263.  ***************************************************************************************************************************
  264.  */
  265.  
  266. cfInsertHEAD(false);
  267. if(cfBGetVar('name')=='iPhone') echo '<meta name="viewport" id="viewport" content="width=device-width, height=500, initial-scale=1.0, user-scalable='.((cfRGetVar('fullSizeView')=='full')?'yes':'no').'">';
  268.  
  269. // Include explorer.js scripts (for dl() function)
  270. echo cfScriptLink('explorer.js');
  271.  
  272. // Include view image scripts
  273. echo cfScriptLink('viewImage.js');
  274.  
  275. // Set JS vars
  276. ?>
  277. <script type="text/javascript">
  278. var adaptViewport=<?php if(cfBGetVar('name')=='iPhone') echo '1'; else echo '0'; ?>;
  279. var defaultTitle="<?php echo str_replace('"','\\"',cfUTF8Encode(cfRGetVar('name')));?>";
  280. var slideshow=<?php echo ((cfRGetVar('slideshow'))?'1':'0'); // 1 in slideshow mode, 0 in normal viewing mode?>;
  281. var sTimeout=<?php echo ((cfRGetVar('slideShowInterval')!=0)?cfRGetVar('slideShowInterval')*1000:DEFAULT_SLIDESHOW_INTERVAL*1000);?>;
  282. var imgURL; var imgURLFull; var imgURLPrev; var imgURLNext; <?php // Template URLs of current, full-size, prev, next images ?>
  283. var imgFullSizeLoaded=<?php echo ((cfRGetVar('fullSizeView'))?'1':'0');?>;
  284. var zoom="<?php echo ((cfRGetVar('fullSizeView'))?'full':'resized');?>";
  285. var zoomSteps=<?php if(cfBGetVar('name')=='iPhone') echo 1; elseif(cfBGetVar('fastAnim')) echo 5; else echo 3;?>;
  286. var slideSteps=<?php if(cfBGetVar('fastAnim')) echo 15; else echo 7;?>;
  287. var emptySrc="<?php echo outIcon('v');?>";
  288. var reducedPreview=<?php echo (cfRGetVar('reducedPreview')?1:0);?>;
  289. var bDrag=<?php echo (cfBGetVar('drag')?1:0);?>;
  290. var SLIDESHOW_TIMER_CONTROL_NAME="<?php echo SLIDESHOW_TIMER_CONTROL_NAME;?>";
  291. var secCaption="<?php echo cfCaption('genSeconds');?>";
  292. </script>
  293. <style type="text/css">
  294. .blackFrame{background:black;padding:0;margin:0}
  295. .imageView {position:absolute;margin:0px;overflow:hidden;width:1px;height:1px}
  296. .blackFrame .imageView{background:#050505;border:1px solid #151515}
  297. </style>
  298. </head>
  299. <body class="iframeBody" id="imageFrameBody" style="margin:0px;overflow:hidden<?php if(cfRGetVar('slideshow')) echo ';background:black';?>" onkeydown="keyPressed(event)" onload="init()" onorientationchange="updateOrientation()">
  300. <?php
  301. echo cfScriptLink('wz_dragdrop.js');
  302.  
  303. // Standard com form
  304. outInsertStandardComForm($_SERVER['PHP_SELF'],cfUTF8Encode(cfDirName(cfResourceRelativePath($completeFilename))),cfUTF8Encode(basename($completeFilename)),'view');
  305. echo outDivFrame(((cfRGetVar('slideshow'))?'blackFrame':'frame1'),'id="frame1" onclick="bgClick()"','margin:0;padding-left:0;padding-right:0;padding-bottom:0;text-align:center;overflow:hidden;border:0px solid red;');
  306.  
  307. $l='';$c='';$r='';
  308.  
  309. /**
  310.  ***************************************************************************************************************************
  311.  * TOP Controls
  312.  ***************************************************************************************************************************
  313.  */
  314.  
  315. // Normal display
  316.  
  317. // Left part
  318. // Download button
  319. if(cfRGetVar('downloadShortcut')) $l.=outButton(false,'javascript:dl(document.comForm.data2.value)',outIcon('dl'),cfCaption('genDownload'));
  320. // Multiple download button
  321. if(cfRGetVar('multipleDownloadAllowed') && cfTGetVar('frames')) $l.=outButton('',"javascript:mAddOpener(document.comForm.data2.value)", outIcon('mdl'),cfCaption('explorerMultipleDownloadAdd'));
  322.  
  323.  
  324. // Previous image
  325. if(cfBGetVar('drag')) $l.=' '.outButton('','javascript:buttonPrev()',outIcon('prev'),cfCaption('explorerPrevious'),false);
  326. // Toogle to slide show mode
  327. $l.='<div id="slideShowStartBt" style="display:inline">'. outButton(false,'javascript:toggleSlideshow(1)',outIcon('sshow'),cfCaption('explorerSlideShowStart')).'</div>';
  328. // Next image
  329. if(cfBGetVar('drag')) $l.=outButton('','javascript:buttonNext()',outIcon('next'),cfCaption('explorerNext'),false);
  330.  
  331.  
  332.  
  333. // Center part
  334. // Title
  335. $c.=(($l)?' ':'').'<span style="white-space:nowrap;overflow:hidden" id="viewImageTitle">'.cfUTF8Encode(cfFileWithoutExtension(basename($completeFilename))).'</span>';
  336. // hidden Filename
  337. $c.='<span style="display:none" id="viewedFile">'.cfUTF8Encode(basename($completeFilename)).'</span>';
  338.  
  339.  
  340.  
  341. // Right part
  342. // Rotate and full/normal size buttons
  343. if(!cfRGetVar('noImageRotation')){
  344.     $r.=outButton(false,'javascript:rotateLeft()',outIcon('rotL'),cfCaption('viewRotateLeft'));
  345.     $r.=outButton(false,'javascript:rotateRight()',outIcon('rotR'),cfCaption('viewRotateRight'));
  346. }
  347. $r.=outButton('','javascript:winMe.restore()',outIcon('normalSize'),false,'normalSizeButton','style="display:none;"');
  348.  
  349. // Insert frame header (title + buttons)
  350. if(cfBGetVar('name')=='iPhone') echo '<div class="frame1Header" id="headerNormal" style="display:none">'.$c.$r.$l.'</div>';
  351. elseif(cfTGetVar('compactDisplay')) echo '<div class="frame1Header" id="headerNormal" style="margin-bottom:0px'.((cfRGetVar('slideshow'))?';display:none':'').'">'.$c.$r.$l.'</div>';
  352. else echo outFrameHeaderTable('frame1Header',$l,$r,'id="headerNormal"','margin-bottom:0px;'.((cfRGetVar('slideshow'))?'display:none':''),$c);
  353.  
  354. // Slideshow view
  355. echo '<div id="headerSlideshow" style="position:absolute;z-index:2000;left:0;text-align:left;'.((cfRGetVar('slideshow'))?'':'top:-1000px').'">';
  356. echo outButton(false,'javascript:toggleSlideshow(0)',outIcon('sshowStop'),cfCaption('explorerSlideShowStop')); // Toggle back to normal view
  357. echo outButton('','javascript:winMe.restore()',outIcon('normalSize'),false,'normalSizeButton2','style="display:none;"');
  358. echo outButton(false,'javascript:slideshowPause()' ,outIcon('pause'),false,'slideShowPauseBt');
  359. echo outButton(false,'javascript:slideshowResume()',outIcon('sshow'),false,'slideShowResumeBt','style="display:none"');
  360. if(!cfRGetVar('slideShowInterval')) cfRSetVar('slideShowInterval',4);
  361. echo outControl(SLIDESHOW_TIMER_CONTROL_NAME,dataList,cfRGetVar('slideShowInterval'),array(1,2,3,4,5,10,15,30),'slider',array('width'=>'9em'));
  362. echo '</div>';
  363. /**
  364.  ***************************************************************************************************************************
  365.  * Images
  366.  ***************************************************************************************************************************
  367.  */
  368. ?>
  369.     <div style="width:100%;overflow:hidden;position:relative;text-align:left" id="scrollDiv">
  370.         <div id="imgDiv" class="imageView" onclick="toggleZoom()">
  371.             <img id="img" src="<?php echo outIcon('v');?>" onload="loaded(this.id)" onerror="loaded(this.id)" style="visibility:hidden" alt="">
  372.         </div>
  373.         <div id="imgNextDiv" class="imageView" onclick="toggleZoom()">
  374.             <img id="imgNext" onload="loaded(this.id)" onerror="loaded(this.id)" alt="" title="">
  375.         </div>
  376.         <div id="imgPrevDiv" class="imageView" onclick="toggleZoom()">
  377.             <img id="imgPrev" onload="loaded(this.id)" onerror="loaded(this.id)" alt="" title="">
  378.         </div>
  379.         <img id="imgCacheFull" alt="" onload="loaded(this.id)" style="visibility:hidden;position:absolute">
  380.         <img id="imgCacheNext" alt="" onload="loaded(this.id)" style="visibility:hidden;position:absolute">
  381.         <img id="imgCachePrev" alt="" onload="loaded(this.id)" style="visibility:hidden;position:absolute">
  382.         <img id="loading" style="position:absolute;top:3px;left:3px;display:none;z-index:1000;" src="<?php echo outIcon('loadingBlack');?>">
  383.     </div>
  384. <div id="filePosDiv" style="position:absolute;bottom:0.2em;right:0.2em;">
  385. </div>
  386. <?php
  387. if((cfBGetVar('drag') && cfRGetVar('showExifData'))) {
  388. ?>
  389. <img id="exifHover" src="<?php echo outIcon('exif');?>" style="position:absolute;bottom:0.2em;left:0.2em;display:none" onmouseover="tooltip(this)">
  390. <script type="text/javascript">
  391. function showExifHover(show){
  392.     dgi('exifHover').style.zIndex=dd.z+1;
  393.     if((dgi('exifHover').style.display=='none' && !show) || (dgi('exifHover').style.display!='none' && show)) return;
  394.     if(show) fade('exifHover',0,1,3); else fade('exifHover',1,0,3);
  395. }
  396. function tooltipGetContent(nodeId){
  397.     submitFrm('getFileInfo');
  398.     return '<img id="tooltipLoading" src="<?php echo outIcon('loading');?>" style="cursor:pointer">';
  399. }
  400. </script>
  401. <?php
  402. }
  403.  
  404. /**
  405.  ***************************************************************************************************************************
  406.  * Scripts
  407.  ***************************************************************************************************************************
  408.  */
  409. ?>
  410. <script type="text/javascript">
  411. <?php
  412. cfDragAddItem('imgDiv',    '+CURSOR_HAND+INERTIA+NOBOUNCE+RESET_Z');
  413. cfDragAddItem('imgPrevDiv','+CURSOR_HAND+INERTIA+NOBOUNCE+RESET_Z');
  414. cfDragAddItem('imgNextDiv','+CURSOR_HAND+INERTIA+NOBOUNCE+RESET_Z');
  415. cfDragAddItem('foo','+CURSOR_HAND+INERTIA+NOBOUNCE');
  416. echo cfDragRegisterItems(false,false);
  417. ?>
  418. document.body.focus();
  419. </script>
  420. </body>
  421. </html>